﻿using Inovout.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inovout.Kuajing.Models
{
    public partial class Commodity
    {
        private static readonly float costPriceRate = float.Parse(ComponentRegistry.Resolve<IApplication>().Settings["CostPriceRate"].ToString());
        private decimal costPrice;
        public virtual decimal CostPrice
        {
            get
            {
                costPrice = Math.Round((decimal)(Price * (1 + costPriceRate / 100)), 2);
                return costPrice;
            }
            set { costPrice = value; }
        }
    }
}
